<html lang="zh_cn">
<head>
    <meta charset="utf-8">
    <title>{$info['title']??($title ? $title : $config.title)}</title>
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <meta name="keywords" content="{$info['keywords']??($keywords ? $keywords : $config.keyword)}">
    <meta name="description" content="{$info['description']??($description ? $description : $config.info)}">
    <link rel="stylesheet" href="/fly/layui/css/layui.css">
    <link rel="stylesheet" href="/static/home/css/global.css">
    <script src="__LAYUI__/layui.js"></script>
</head>
<body>
<div class="fly-header layui-bg-black">
    <div class="layui-container">
        <a class="fly-logo" href="{$config.domain}">
            <img src="{$config.logo}" alt="layui">
        </a>
        <ul class="layui-nav fly-nav layui-hide-xs">
            <li class="layui-nav-item {if condition="$controller eq 'index'"}layui-this{/if}">
            <a href="{$config.domain}">首页</a>
            </li>
            {volist name="category" id="vo"}
            <li class="layui-nav-item {if condition="$controller eq $vo['catdir']"}layui-this{/if}" >

            {if condition="$vo['child'] eq 1"}
            <a href="javascript:;">{$vo.catname}</a>
            <dl class="layui-nav-child">
                {volist name="$vo.sub" id="v"}
                <dd><a href="{$v.url}" {if $v.type eq 1} target="_blank"{/if}>{$v.catname}</a></dd>
                {/volist}
            </dl>
            {else/}
            <a href="{$vo.url}" {if $vo.type eq 1} target="_blank"{/if}>{$vo.catname}</a>
            {/if}
            </li>
            {/volist}
        </ul>
        <ul class="layui-nav fly-nav-user">

            {if $userInfo}
            <li class="layui-nav-item">
                <a class="fly-nav-avatar" href="{:url('user/index/index')}">
                    <cite class="layui-hide-xs">{$userInfo['username']}</cite>
                    <i class="layui-badge fly-badge-vip layui-hide-xs">{$userInfo['level']}</i>
                    <img src="{:session('user.avatar')}">
                </a>
                <dl class="layui-nav-child">
                    <dd><a href="{:url('user/index/index')}"><i class="layui-icon" style="margin-left: 2px; font-size: 22px;">&#xe68e;</i>我的主页</a></dd>
                    <dd><a href="{:url('user/set/index')}"><i class="layui-icon">&#xe620;</i>基本设置</a></dd>
                    <dd><a href="{:url('user/message/index')}"><i class="iconfont icon-tongzhi" style="top: 4px;"></i>我的消息</a></dd>
                    <hr style="margin: 5px 0;">
                    <dd><a href="{:url('user/index/loginout')}" style="text-align: center;">退出</a></dd>
                </dl>
            </li>
            {else/}
            <!-- 未登入的状态 -->
            <li class="layui-nav-item">
                <a class="iconfont icon-touxiang layui-hide-xs" href="{:url('user/login/index')}"></a>
            </li>
            <li class="layui-nav-item">
                <a href="{:url('user/login/index')}">登入</a>
            </li>
            {/if}
        </ul>
    </div>
</div>